﻿using PagedList;
using SelfMadeMillionaire.Core.Entities;
using SelfMadeMillionaire.Core.Enums;
using SelfMadeMillionaire.Web.Infrastructure.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace SelfMadeMillionaire.Web.Infrastructure.ViewModels.Newsletters
{
	public class NewsletterListViewModel
	{
        public string SortOrder { get; set; }

        public IPagedList<Newsletter> Newsletters { get; set; }

		[DisplayName("Start Date:")]
		public DateTime? StartDate { get; set; }

		[DisplayName("End Date:")]
		public DateTime? EndDate { get; set; }

		public SelectList IssueTypes { get; set; }

		[DisplayName("Issue Type:")]
		public byte? SelectedIssueType { get; set; }

		public SelectList ProductTypes { get; set; }

		[DisplayName("Letter:")]
		public ProductType? SelectedProduct { get; set; }

		[DisplayName("Title:")]
		[StringLength(100, ErrorMessage = "Length of Title too much")]
		public string Title { get; set; }

		[DisplayName("Symbol(s):")]
		[StringLength(100, ErrorMessage = "Length of Title too much")]
		public string Symbols { get; set; }

        [DisplayName("Min. Access Level:")]
        public byte? MinAccessLevel { get; set; }
        public SelectList AccessLevels { get; set; }

		public NewsletterEditViewModel EditModel { get; set; }

        public bool IsSendLinkVisible { get; set; }
	}
}
